package com.zt.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 王佳祥
 * @Date: 2024 09 09 11:49
 */
@RestController
@ControllerAdvice
public class GloadException {


    /**
     * 算数处理异常
     * @param e
     * @return
     */
    @ExceptionHandler(ArithmeticException.class)
    public String handleArithmeticException(ArithmeticException e){

        return "算数异常"+e;
    }
}


